
_rrtest：     文件格式 elf32-i386


Disassembly of section .text:

00000000 <main>:
		busy_computing();
		printf(1,"-%d-",getpid());
	}
}

int main(){
   0:	8d 4c 24 04          	lea    0x4(%esp),%ecx
   4:	83 e4 f0             	and    $0xfffffff0,%esp
   7:	ff 71 fc             	push   -0x4(%ecx)
   a:	55                   	push   %ebp
   b:	89 e5                	mov    %esp,%ebp
   d:	57                   	push   %edi
        int fd[4][2];
        char c;
        printf(1,"================================\n");
        pid=getpid();
        printf(1,"Parent (pid=%d)\n",pid);
        for(i=0;i<4;i++){
   e:	31 ff                	xor    %edi,%edi
int main(){
  10:	56                   	push   %esi
  11:	53                   	push   %ebx
  12:	8d 5d c8             	lea    -0x38(%ebp),%ebx
  15:	51                   	push   %ecx
        printf(1,"Parent (pid=%d)\n",pid);
  16:	89 de                	mov    %ebx,%esi
int main(){
  18:	83 ec 50             	sub    $0x50,%esp
        printf(1,"================================\n");
  1b:	68 a8 0b 00 00       	push   $0xba8
  20:	6a 01                	push   $0x1
  22:	e8 29 08 00 00       	call   850 <printf>
        pid=getpid();
  27:	e8 07 07 00 00       	call   733 <getpid>
        printf(1,"Parent (pid=%d)\n",pid);
  2c:	83 c4 0c             	add    $0xc,%esp
  2f:	50                   	push   %eax
  30:	68 7d 0b 00 00       	push   $0xb7d
  35:	6a 01                	push   $0x1
  37:	e8 14 08 00 00       	call   850 <printf>
        for(i=0;i<4;i++){
  3c:	83 c4 10             	add    $0x10,%esp
                pipe(fd[i]);				
  3f:	83 ec 0c             	sub    $0xc,%esp
  42:	56                   	push   %esi
  43:	e8 7b 06 00 00       	call   6c3 <pipe>
                if((pid=fork())==0){
  48:	e8 5e 06 00 00       	call   6ab <fork>
  4d:	83 c4 10             	add    $0x10,%esp
  50:	85 c0                	test   %eax,%eax
  52:	0f 84 9c 00 00 00    	je     f4 <main+0xf4>
                        close(fd[i][1]);//child close write end
                        read(fd[i][0],&c,1);//wait signal from parent
                        print_pid();
                        exit();
                }else{
                        close(fd[i][0]);//parent close read end                        
  58:	83 ec 0c             	sub    $0xc,%esp
  5b:	ff 36                	push   (%esi)
        for(i=0;i<4;i++){
  5d:	83 c7 01             	add    $0x1,%edi
  60:	83 c6 08             	add    $0x8,%esi
  63:	89 45 b4             	mov    %eax,-0x4c(%ebp)
                        close(fd[i][0]);//parent close read end                        
  66:	e8 70 06 00 00       	call   6db <close>
                        printf(1,"Child (pid=%d) created!\n",pid);
  6b:	8b 55 b4             	mov    -0x4c(%ebp),%edx
  6e:	83 c4 0c             	add    $0xc,%esp
  71:	52                   	push   %edx
  72:	68 8e 0b 00 00       	push   $0xb8e
  77:	6a 01                	push   $0x1
  79:	e8 d2 07 00 00       	call   850 <printf>
        for(i=0;i<4;i++){
  7e:	83 c4 10             	add    $0x10,%esp
  81:	83 ff 04             	cmp    $0x4,%edi
  84:	75 b9                	jne    3f <main+0x3f>
                }
        }        
        fib(30);//wait for all children finishing printing prompt
  86:	83 ec 0c             	sub    $0xc,%esp
  89:	8d 7b 20             	lea    0x20(%ebx),%edi
  8c:	8d 75 c7             	lea    -0x39(%ebp),%esi
  8f:	6a 1e                	push   $0x1e
  91:	e8 9a 00 00 00       	call   130 <fib>
  96:	5a                   	pop    %edx
  97:	59                   	pop    %ecx
	printf(1,"================================\n");        
  98:	68 a8 0b 00 00       	push   $0xba8
  9d:	6a 01                	push   $0x1
  9f:	e8 ac 07 00 00       	call   850 <printf>

        //parent wake up all children
        for(i=0;i<4;i++){
  a4:	83 c4 10             	add    $0x10,%esp
        c='a';
        write(fd[i][1],&c,1);
  a7:	83 ec 04             	sub    $0x4,%esp
        c='a';
  aa:	c6 45 c7 61          	movb   $0x61,-0x39(%ebp)
        for(i=0;i<4;i++){
  ae:	83 c3 08             	add    $0x8,%ebx
        write(fd[i][1],&c,1);
  b1:	6a 01                	push   $0x1
  b3:	56                   	push   %esi
  b4:	ff 73 fc             	push   -0x4(%ebx)
  b7:	e8 17 06 00 00       	call   6d3 <write>
        close(fd[i][1]);
  bc:	58                   	pop    %eax
  bd:	ff 73 fc             	push   -0x4(%ebx)
  c0:	e8 16 06 00 00       	call   6db <close>
        for(i=0;i<4;i++){
  c5:	83 c4 10             	add    $0x10,%esp
  c8:	39 df                	cmp    %ebx,%edi
  ca:	75 db                	jne    a7 <main+0xa7>
        }

        //parent wait for child
        for(i=0;i<4;i++)
                wait();        
  cc:	e8 ea 05 00 00       	call   6bb <wait>
  d1:	e8 e5 05 00 00       	call   6bb <wait>
  d6:	e8 e0 05 00 00       	call   6bb <wait>
  db:	e8 db 05 00 00       	call   6bb <wait>
        printf(1,"\n");
  e0:	83 ec 08             	sub    $0x8,%esp
  e3:	68 a5 0b 00 00       	push   $0xba5
  e8:	6a 01                	push   $0x1
  ea:	e8 61 07 00 00       	call   850 <printf>
        exit();
  ef:	e8 bf 05 00 00       	call   6b3 <exit>
			if(i>=2) set_quantum(5); //the first 2 child processes have default quantum, the rest have quantum 5
  f4:	83 ff 01             	cmp    $0x1,%edi
  f7:	7e 0d                	jle    106 <main+0x106>
  f9:	83 ec 0c             	sub    $0xc,%esp
  fc:	6a 05                	push   $0x5
  fe:	e8 58 06 00 00       	call   75b <set_quantum>
 103:	83 c4 10             	add    $0x10,%esp
                        close(fd[i][1]);//child close write end
 106:	83 ec 0c             	sub    $0xc,%esp
 109:	ff 74 fd cc          	push   -0x34(%ebp,%edi,8)
 10d:	e8 c9 05 00 00       	call   6db <close>
                        read(fd[i][0],&c,1);//wait signal from parent
 112:	83 c4 0c             	add    $0xc,%esp
 115:	8d 45 c7             	lea    -0x39(%ebp),%eax
 118:	6a 01                	push   $0x1
 11a:	50                   	push   %eax
 11b:	ff 74 fd c8          	push   -0x38(%ebp,%edi,8)
 11f:	e8 a7 05 00 00       	call   6cb <read>
                        print_pid();
 124:	e8 e7 02 00 00       	call   410 <print_pid>
                        exit();
 129:	e8 85 05 00 00       	call   6b3 <exit>
 12e:	66 90                	xchg   %ax,%ax

00000130 <fib>:
int fib(int i){
 130:	55                   	push   %ebp
 131:	89 e5                	mov    %esp,%ebp
 133:	57                   	push   %edi
 134:	56                   	push   %esi
 135:	53                   	push   %ebx
 136:	83 ec 7c             	sub    $0x7c,%esp
	if(i<1)return i;
 139:	8b 45 08             	mov    0x8(%ebp),%eax
 13c:	c7 45 a8 00 00 00 00 	movl   $0x0,-0x58(%ebp)
 143:	85 c0                	test   %eax,%eax
 145:	0f 8e 20 02 00 00    	jle    36b <fib+0x23b>
 14b:	83 f8 01             	cmp    $0x1,%eax
 14e:	0f 84 70 02 00 00    	je     3c4 <fib+0x294>
 154:	8d 48 fe             	lea    -0x2(%eax),%ecx
 157:	8d 58 fd             	lea    -0x3(%eax),%ebx
 15a:	83 e8 05             	sub    $0x5,%eax
 15d:	c7 45 a4 00 00 00 00 	movl   $0x0,-0x5c(%ebp)
 164:	89 4d ac             	mov    %ecx,-0x54(%ebp)
 167:	83 e1 fe             	and    $0xfffffffe,%ecx
 16a:	29 c8                	sub    %ecx,%eax
 16c:	89 5d 8c             	mov    %ebx,-0x74(%ebp)
 16f:	89 45 90             	mov    %eax,-0x70(%ebp)
 172:	89 5d d4             	mov    %ebx,-0x2c(%ebp)
 175:	83 7d d4 ff          	cmpl   $0xffffffff,-0x2c(%ebp)
 179:	0f 84 3e 02 00 00    	je     3bd <fib+0x28d>
 17f:	8b 45 d4             	mov    -0x2c(%ebp),%eax
 182:	c7 45 a0 00 00 00 00 	movl   $0x0,-0x60(%ebp)
 189:	89 c3                	mov    %eax,%ebx
 18b:	89 45 b4             	mov    %eax,-0x4c(%ebp)
 18e:	83 cb fe             	or     $0xfffffffe,%ebx
 191:	89 5d 94             	mov    %ebx,-0x6c(%ebp)
 194:	8b 4d b4             	mov    -0x4c(%ebp),%ecx
 197:	c7 45 9c 00 00 00 00 	movl   $0x0,-0x64(%ebp)
 19e:	89 c8                	mov    %ecx,%eax
 1a0:	85 c9                	test   %ecx,%ecx
 1a2:	0f 84 09 02 00 00    	je     3b1 <fib+0x281>
 1a8:	83 f8 01             	cmp    $0x1,%eax
 1ab:	0f 84 f2 01 00 00    	je     3a3 <fib+0x273>
 1b1:	8d 70 fe             	lea    -0x2(%eax),%esi
 1b4:	8d 78 fd             	lea    -0x3(%eax),%edi
 1b7:	83 e8 05             	sub    $0x5,%eax
 1ba:	c7 45 d0 00 00 00 00 	movl   $0x0,-0x30(%ebp)
 1c1:	89 75 b0             	mov    %esi,-0x50(%ebp)
 1c4:	83 e6 fe             	and    $0xfffffffe,%esi
 1c7:	29 f0                	sub    %esi,%eax
 1c9:	89 7d 98             	mov    %edi,-0x68(%ebp)
 1cc:	89 45 bc             	mov    %eax,-0x44(%ebp)
 1cf:	83 ff ff             	cmp    $0xffffffff,%edi
 1d2:	0f 84 c4 01 00 00    	je     39c <fib+0x26c>
 1d8:	89 f8                	mov    %edi,%eax
 1da:	c7 45 e0 00 00 00 00 	movl   $0x0,-0x20(%ebp)
 1e1:	83 c8 fe             	or     $0xfffffffe,%eax
 1e4:	89 7d c4             	mov    %edi,-0x3c(%ebp)
 1e7:	89 45 b8             	mov    %eax,-0x48(%ebp)
 1ea:	85 ff                	test   %edi,%edi
 1ec:	0f 84 84 01 00 00    	je     376 <fib+0x246>
 1f2:	8d 77 fe             	lea    -0x2(%edi),%esi
 1f5:	8d 47 fd             	lea    -0x3(%edi),%eax
 1f8:	89 7d dc             	mov    %edi,-0x24(%ebp)
 1fb:	89 45 cc             	mov    %eax,-0x34(%ebp)
 1fe:	89 75 e4             	mov    %esi,-0x1c(%ebp)
 201:	c7 45 d8 00 00 00 00 	movl   $0x0,-0x28(%ebp)
 208:	89 75 c0             	mov    %esi,-0x40(%ebp)
 20b:	83 7d e4 ff          	cmpl   $0xffffffff,-0x1c(%ebp)
 20f:	0f 84 73 01 00 00    	je     388 <fib+0x258>
 215:	8b 45 dc             	mov    -0x24(%ebp),%eax
 218:	8b 5d e4             	mov    -0x1c(%ebp),%ebx
 21b:	31 f6                	xor    %esi,%esi
 21d:	8d 50 fc             	lea    -0x4(%eax),%edx
 220:	89 d8                	mov    %ebx,%eax
 222:	83 e0 fe             	and    $0xfffffffe,%eax
 225:	29 c2                	sub    %eax,%edx
 227:	89 55 c8             	mov    %edx,-0x38(%ebp)
 22a:	89 fa                	mov    %edi,%edx
 22c:	89 d9                	mov    %ebx,%ecx
 22e:	31 ff                	xor    %edi,%edi
 230:	85 db                	test   %ebx,%ebx
 232:	0f 84 58 01 00 00    	je     390 <fib+0x260>
	return fib(i-1)+fib(i-2);
 238:	83 ec 0c             	sub    $0xc,%esp
 23b:	8d 41 ff             	lea    -0x1(%ecx),%eax
 23e:	89 55 84             	mov    %edx,-0x7c(%ebp)
 241:	50                   	push   %eax
 242:	89 4d 88             	mov    %ecx,-0x78(%ebp)
 245:	e8 e6 fe ff ff       	call   130 <fib>
	if(i<1)return i;
 24a:	8b 4d 88             	mov    -0x78(%ebp),%ecx
	return fib(i-1)+fib(i-2);
 24d:	83 c4 10             	add    $0x10,%esp
	if(i<1)return i;
 250:	8b 55 84             	mov    -0x7c(%ebp),%edx
 253:	01 c7                	add    %eax,%edi
 255:	83 e9 02             	sub    $0x2,%ecx
 258:	85 c9                	test   %ecx,%ecx
 25a:	7f dc                	jg     238 <fib+0x108>
	return fib(i-1)+fib(i-2);
 25c:	8d 4b ff             	lea    -0x1(%ebx),%ecx
 25f:	83 eb 02             	sub    $0x2,%ebx
 262:	83 e1 fe             	and    $0xfffffffe,%ecx
 265:	89 d8                	mov    %ebx,%eax
 267:	29 c8                	sub    %ecx,%eax
 269:	01 f8                	add    %edi,%eax
	if(i<1)return i;
 26b:	01 c6                	add    %eax,%esi
 26d:	39 5d c8             	cmp    %ebx,-0x38(%ebp)
 270:	75 ba                	jne    22c <fib+0xfc>
	return fib(i-1)+fib(i-2);
 272:	89 d7                	mov    %edx,%edi
 274:	8b 55 e4             	mov    -0x1c(%ebp),%edx
 277:	8b 45 cc             	mov    -0x34(%ebp),%eax
 27a:	83 e2 fe             	and    $0xfffffffe,%edx
 27d:	29 d0                	sub    %edx,%eax
 27f:	01 f0                	add    %esi,%eax
	if(i<1)return i;
 281:	01 45 d8             	add    %eax,-0x28(%ebp)
 284:	83 6d dc 02          	subl   $0x2,-0x24(%ebp)
 288:	8b 45 dc             	mov    -0x24(%ebp),%eax
 28b:	83 6d e4 02          	subl   $0x2,-0x1c(%ebp)
 28f:	83 6d cc 02          	subl   $0x2,-0x34(%ebp)
 293:	85 c0                	test   %eax,%eax
 295:	0f 8f 70 ff ff ff    	jg     20b <fib+0xdb>
	return fib(i-1)+fib(i-2);
 29b:	8b 75 c0             	mov    -0x40(%ebp),%esi
 29e:	8d 57 ff             	lea    -0x1(%edi),%edx
 2a1:	83 e2 fe             	and    $0xfffffffe,%edx
 2a4:	89 f0                	mov    %esi,%eax
 2a6:	29 d0                	sub    %edx,%eax
 2a8:	03 45 d8             	add    -0x28(%ebp),%eax
	if(i<1)return i;
 2ab:	01 45 e0             	add    %eax,-0x20(%ebp)
 2ae:	89 f7                	mov    %esi,%edi
 2b0:	39 75 b8             	cmp    %esi,-0x48(%ebp)
 2b3:	0f 85 31 ff ff ff    	jne    1ea <fib+0xba>
	return fib(i-1)+fib(i-2);
 2b9:	8b 7d c4             	mov    -0x3c(%ebp),%edi
 2bc:	89 fa                	mov    %edi,%edx
 2be:	8d 47 ff             	lea    -0x1(%edi),%eax
 2c1:	83 e2 fe             	and    $0xfffffffe,%edx
 2c4:	29 d0                	sub    %edx,%eax
 2c6:	03 45 e0             	add    -0x20(%ebp),%eax
	if(i<1)return i;
 2c9:	01 45 d0             	add    %eax,-0x30(%ebp)
 2cc:	83 ef 02             	sub    $0x2,%edi
 2cf:	39 7d bc             	cmp    %edi,-0x44(%ebp)
 2d2:	0f 85 f7 fe ff ff    	jne    1cf <fib+0x9f>
	return fib(i-1)+fib(i-2);
 2d8:	8b 55 b0             	mov    -0x50(%ebp),%edx
 2db:	8b 45 98             	mov    -0x68(%ebp),%eax
 2de:	83 e2 fe             	and    $0xfffffffe,%edx
 2e1:	29 d0                	sub    %edx,%eax
 2e3:	03 45 d0             	add    -0x30(%ebp),%eax
	if(i<1)return i;
 2e6:	01 45 9c             	add    %eax,-0x64(%ebp)
 2e9:	8b 45 b0             	mov    -0x50(%ebp),%eax
 2ec:	85 c0                	test   %eax,%eax
 2ee:	0f 8f b4 fe ff ff    	jg     1a8 <fib+0x78>
	return fib(i-1)+fib(i-2);
 2f4:	8b 45 b4             	mov    -0x4c(%ebp),%eax
 2f7:	8d 50 ff             	lea    -0x1(%eax),%edx
 2fa:	8d 48 fe             	lea    -0x2(%eax),%ecx
 2fd:	83 e2 fe             	and    $0xfffffffe,%edx
 300:	89 c8                	mov    %ecx,%eax
 302:	29 d0                	sub    %edx,%eax
 304:	03 45 9c             	add    -0x64(%ebp),%eax
	if(i<1)return i;
 307:	8b 75 94             	mov    -0x6c(%ebp),%esi
 30a:	01 45 a0             	add    %eax,-0x60(%ebp)
 30d:	89 4d b4             	mov    %ecx,-0x4c(%ebp)
 310:	39 f1                	cmp    %esi,%ecx
 312:	0f 85 7c fe ff ff    	jne    194 <fib+0x64>
	return fib(i-1)+fib(i-2);
 318:	8b 45 d4             	mov    -0x2c(%ebp),%eax
 31b:	89 c2                	mov    %eax,%edx
 31d:	83 e8 01             	sub    $0x1,%eax
 320:	83 e2 fe             	and    $0xfffffffe,%edx
 323:	29 d0                	sub    %edx,%eax
 325:	03 45 a0             	add    -0x60(%ebp),%eax
	if(i<1)return i;
 328:	01 45 a4             	add    %eax,-0x5c(%ebp)
 32b:	83 6d d4 02          	subl   $0x2,-0x2c(%ebp)
 32f:	8b 45 d4             	mov    -0x2c(%ebp),%eax
 332:	3b 45 90             	cmp    -0x70(%ebp),%eax
 335:	0f 85 3a fe ff ff    	jne    175 <fib+0x45>
	return fib(i-1)+fib(i-2);
 33b:	8b 55 ac             	mov    -0x54(%ebp),%edx
 33e:	8b 45 8c             	mov    -0x74(%ebp),%eax
 341:	83 e2 fe             	and    $0xfffffffe,%edx
 344:	29 d0                	sub    %edx,%eax
 346:	03 45 a4             	add    -0x5c(%ebp),%eax
	if(i<1)return i;
 349:	01 45 a8             	add    %eax,-0x58(%ebp)
 34c:	8b 45 ac             	mov    -0x54(%ebp),%eax
 34f:	85 c0                	test   %eax,%eax
 351:	0f 8f f4 fd ff ff    	jg     14b <fib+0x1b>
	return fib(i-1)+fib(i-2);
 357:	8b 45 08             	mov    0x8(%ebp),%eax
 35a:	8d 50 ff             	lea    -0x1(%eax),%edx
 35d:	83 e8 02             	sub    $0x2,%eax
 360:	83 e2 fe             	and    $0xfffffffe,%edx
 363:	29 d0                	sub    %edx,%eax
 365:	03 45 a8             	add    -0x58(%ebp),%eax
 368:	89 45 08             	mov    %eax,0x8(%ebp)
}
 36b:	8b 45 08             	mov    0x8(%ebp),%eax
 36e:	8d 65 f4             	lea    -0xc(%ebp),%esp
 371:	5b                   	pop    %ebx
 372:	5e                   	pop    %esi
 373:	5f                   	pop    %edi
 374:	5d                   	pop    %ebp
 375:	c3                   	ret    
	if(i<1)return i;
 376:	31 c0                	xor    %eax,%eax
 378:	be fe ff ff ff       	mov    $0xfffffffe,%esi
 37d:	e9 29 ff ff ff       	jmp    2ab <fib+0x17b>
 382:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
 388:	31 c0                	xor    %eax,%eax
 38a:	e9 f2 fe ff ff       	jmp    281 <fib+0x151>
 38f:	90                   	nop
 390:	31 c0                	xor    %eax,%eax
 392:	bb fe ff ff ff       	mov    $0xfffffffe,%ebx
 397:	e9 cf fe ff ff       	jmp    26b <fib+0x13b>
 39c:	31 c0                	xor    %eax,%eax
 39e:	e9 26 ff ff ff       	jmp    2c9 <fib+0x199>
 3a3:	c7 45 b0 ff ff ff ff 	movl   $0xffffffff,-0x50(%ebp)
 3aa:	31 c0                	xor    %eax,%eax
 3ac:	e9 35 ff ff ff       	jmp    2e6 <fib+0x1b6>
 3b1:	31 c0                	xor    %eax,%eax
 3b3:	b9 fe ff ff ff       	mov    $0xfffffffe,%ecx
 3b8:	e9 4a ff ff ff       	jmp    307 <fib+0x1d7>
 3bd:	31 c0                	xor    %eax,%eax
 3bf:	e9 64 ff ff ff       	jmp    328 <fib+0x1f8>
 3c4:	c7 45 ac ff ff ff ff 	movl   $0xffffffff,-0x54(%ebp)
 3cb:	31 c0                	xor    %eax,%eax
 3cd:	e9 77 ff ff ff       	jmp    349 <fib+0x219>
 3d2:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 3d9:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi

000003e0 <busy_computing>:
void busy_computing(){
 3e0:	55                   	push   %ebp
 3e1:	89 e5                	mov    %esp,%ebp
 3e3:	53                   	push   %ebx
 3e4:	bb 18 00 00 00       	mov    $0x18,%ebx
 3e9:	83 ec 04             	sub    $0x4,%esp
	return fib(i-1)+fib(i-2);
 3ec:	83 ec 0c             	sub    $0xc,%esp
 3ef:	53                   	push   %ebx
	if(i<1)return i;
 3f0:	83 eb 02             	sub    $0x2,%ebx
	return fib(i-1)+fib(i-2);
 3f3:	e8 38 fd ff ff       	call   130 <fib>
 3f8:	83 c4 10             	add    $0x10,%esp
	if(i<1)return i;
 3fb:	83 fb fe             	cmp    $0xfffffffe,%ebx
 3fe:	75 ec                	jne    3ec <busy_computing+0xc>
}
 400:	8b 5d fc             	mov    -0x4(%ebp),%ebx
 403:	c9                   	leave  
 404:	c3                   	ret    
 405:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 40c:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi

00000410 <print_pid>:
void print_pid(){
 410:	55                   	push   %ebp
 411:	89 e5                	mov    %esp,%ebp
 413:	56                   	push   %esi
 414:	be 1e 00 00 00       	mov    $0x1e,%esi
 419:	53                   	push   %ebx
 41a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
 420:	bb 18 00 00 00       	mov    $0x18,%ebx
	return fib(i-1)+fib(i-2);
 425:	83 ec 0c             	sub    $0xc,%esp
 428:	53                   	push   %ebx
	if(i<1)return i;
 429:	83 eb 02             	sub    $0x2,%ebx
	return fib(i-1)+fib(i-2);
 42c:	e8 ff fc ff ff       	call   130 <fib>
 431:	83 c4 10             	add    $0x10,%esp
	if(i<1)return i;
 434:	83 fb fe             	cmp    $0xfffffffe,%ebx
 437:	75 ec                	jne    425 <print_pid+0x15>
		printf(1,"-%d-",getpid());
 439:	e8 f5 02 00 00       	call   733 <getpid>
 43e:	83 ec 04             	sub    $0x4,%esp
 441:	50                   	push   %eax
 442:	68 78 0b 00 00       	push   $0xb78
 447:	6a 01                	push   $0x1
 449:	e8 02 04 00 00       	call   850 <printf>
	while(i++<N){
 44e:	83 c4 10             	add    $0x10,%esp
 451:	83 ee 01             	sub    $0x1,%esi
 454:	75 ca                	jne    420 <print_pid+0x10>
}
 456:	8d 65 f8             	lea    -0x8(%ebp),%esp
 459:	5b                   	pop    %ebx
 45a:	5e                   	pop    %esi
 45b:	5d                   	pop    %ebp
 45c:	c3                   	ret    
 45d:	66 90                	xchg   %ax,%ax
 45f:	90                   	nop

00000460 <strcpy>:
#include "user.h"
#include "x86.h"

char*
strcpy(char *s, char *t)
{
 460:	55                   	push   %ebp
  char *os;

  os = s;
  while((*s++ = *t++) != 0)
 461:	31 c0                	xor    %eax,%eax
{
 463:	89 e5                	mov    %esp,%ebp
 465:	53                   	push   %ebx
 466:	8b 4d 08             	mov    0x8(%ebp),%ecx
 469:	8b 5d 0c             	mov    0xc(%ebp),%ebx
 46c:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
  while((*s++ = *t++) != 0)
 470:	0f b6 14 03          	movzbl (%ebx,%eax,1),%edx
 474:	88 14 01             	mov    %dl,(%ecx,%eax,1)
 477:	83 c0 01             	add    $0x1,%eax
 47a:	84 d2                	test   %dl,%dl
 47c:	75 f2                	jne    470 <strcpy+0x10>
    ;
  return os;
}
 47e:	8b 5d fc             	mov    -0x4(%ebp),%ebx
 481:	89 c8                	mov    %ecx,%eax
 483:	c9                   	leave  
 484:	c3                   	ret    
 485:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 48c:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi

00000490 <strcmp>:

int
strcmp(const char *p, const char *q)
{
 490:	55                   	push   %ebp
 491:	89 e5                	mov    %esp,%ebp
 493:	53                   	push   %ebx
 494:	8b 55 08             	mov    0x8(%ebp),%edx
 497:	8b 4d 0c             	mov    0xc(%ebp),%ecx
  while(*p && *p == *q)
 49a:	0f b6 02             	movzbl (%edx),%eax
 49d:	84 c0                	test   %al,%al
 49f:	75 17                	jne    4b8 <strcmp+0x28>
 4a1:	eb 3a                	jmp    4dd <strcmp+0x4d>
 4a3:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
 4a7:	90                   	nop
 4a8:	0f b6 42 01          	movzbl 0x1(%edx),%eax
    p++, q++;
 4ac:	83 c2 01             	add    $0x1,%edx
 4af:	8d 59 01             	lea    0x1(%ecx),%ebx
  while(*p && *p == *q)
 4b2:	84 c0                	test   %al,%al
 4b4:	74 1a                	je     4d0 <strcmp+0x40>
    p++, q++;
 4b6:	89 d9                	mov    %ebx,%ecx
  while(*p && *p == *q)
 4b8:	0f b6 19             	movzbl (%ecx),%ebx
 4bb:	38 c3                	cmp    %al,%bl
 4bd:	74 e9                	je     4a8 <strcmp+0x18>
  return (uchar)*p - (uchar)*q;
 4bf:	29 d8                	sub    %ebx,%eax
}
 4c1:	8b 5d fc             	mov    -0x4(%ebp),%ebx
 4c4:	c9                   	leave  
 4c5:	c3                   	ret    
 4c6:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 4cd:	8d 76 00             	lea    0x0(%esi),%esi
  return (uchar)*p - (uchar)*q;
 4d0:	0f b6 59 01          	movzbl 0x1(%ecx),%ebx
 4d4:	31 c0                	xor    %eax,%eax
 4d6:	29 d8                	sub    %ebx,%eax
}
 4d8:	8b 5d fc             	mov    -0x4(%ebp),%ebx
 4db:	c9                   	leave  
 4dc:	c3                   	ret    
  return (uchar)*p - (uchar)*q;
 4dd:	0f b6 19             	movzbl (%ecx),%ebx
 4e0:	31 c0                	xor    %eax,%eax
 4e2:	eb db                	jmp    4bf <strcmp+0x2f>
 4e4:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 4eb:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
 4ef:	90                   	nop

000004f0 <strlen>:

uint
strlen(char *s)
{
 4f0:	55                   	push   %ebp
 4f1:	89 e5                	mov    %esp,%ebp
 4f3:	8b 55 08             	mov    0x8(%ebp),%edx
  int n;

  for(n = 0; s[n]; n++)
 4f6:	80 3a 00             	cmpb   $0x0,(%edx)
 4f9:	74 15                	je     510 <strlen+0x20>
 4fb:	31 c0                	xor    %eax,%eax
 4fd:	8d 76 00             	lea    0x0(%esi),%esi
 500:	83 c0 01             	add    $0x1,%eax
 503:	80 3c 02 00          	cmpb   $0x0,(%edx,%eax,1)
 507:	89 c1                	mov    %eax,%ecx
 509:	75 f5                	jne    500 <strlen+0x10>
    ;
  return n;
}
 50b:	89 c8                	mov    %ecx,%eax
 50d:	5d                   	pop    %ebp
 50e:	c3                   	ret    
 50f:	90                   	nop
  for(n = 0; s[n]; n++)
 510:	31 c9                	xor    %ecx,%ecx
}
 512:	5d                   	pop    %ebp
 513:	89 c8                	mov    %ecx,%eax
 515:	c3                   	ret    
 516:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 51d:	8d 76 00             	lea    0x0(%esi),%esi

00000520 <memset>:

void*
memset(void *dst, int c, uint n)
{
 520:	55                   	push   %ebp
 521:	89 e5                	mov    %esp,%ebp
 523:	57                   	push   %edi
 524:	8b 55 08             	mov    0x8(%ebp),%edx
}

static inline void
stosb(void *addr, int data, int cnt)
{
  asm volatile("cld; rep stosb" :
 527:	8b 4d 10             	mov    0x10(%ebp),%ecx
 52a:	8b 45 0c             	mov    0xc(%ebp),%eax
 52d:	89 d7                	mov    %edx,%edi
 52f:	fc                   	cld    
 530:	f3 aa                	rep stos %al,%es:(%edi)
  stosb(dst, c, n);
  return dst;
}
 532:	8b 7d fc             	mov    -0x4(%ebp),%edi
 535:	89 d0                	mov    %edx,%eax
 537:	c9                   	leave  
 538:	c3                   	ret    
 539:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi

00000540 <strchr>:

char*
strchr(const char *s, char c)
{
 540:	55                   	push   %ebp
 541:	89 e5                	mov    %esp,%ebp
 543:	8b 45 08             	mov    0x8(%ebp),%eax
 546:	0f b6 4d 0c          	movzbl 0xc(%ebp),%ecx
  for(; *s; s++)
 54a:	0f b6 10             	movzbl (%eax),%edx
 54d:	84 d2                	test   %dl,%dl
 54f:	75 12                	jne    563 <strchr+0x23>
 551:	eb 1d                	jmp    570 <strchr+0x30>
 553:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
 557:	90                   	nop
 558:	0f b6 50 01          	movzbl 0x1(%eax),%edx
 55c:	83 c0 01             	add    $0x1,%eax
 55f:	84 d2                	test   %dl,%dl
 561:	74 0d                	je     570 <strchr+0x30>
    if(*s == c)
 563:	38 d1                	cmp    %dl,%cl
 565:	75 f1                	jne    558 <strchr+0x18>
      return (char*)s;
  return 0;
}
 567:	5d                   	pop    %ebp
 568:	c3                   	ret    
 569:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
  return 0;
 570:	31 c0                	xor    %eax,%eax
}
 572:	5d                   	pop    %ebp
 573:	c3                   	ret    
 574:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 57b:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
 57f:	90                   	nop

00000580 <gets>:

char*
gets(char *buf, int max)
{
 580:	55                   	push   %ebp
 581:	89 e5                	mov    %esp,%ebp
 583:	57                   	push   %edi
 584:	56                   	push   %esi
  int i, cc;
  char c;

  for(i=0; i+1 < max; ){
    cc = read(0, &c, 1);
 585:	8d 7d e7             	lea    -0x19(%ebp),%edi
{
 588:	53                   	push   %ebx
  for(i=0; i+1 < max; ){
 589:	31 db                	xor    %ebx,%ebx
{
 58b:	83 ec 1c             	sub    $0x1c,%esp
  for(i=0; i+1 < max; ){
 58e:	eb 27                	jmp    5b7 <gets+0x37>
    cc = read(0, &c, 1);
 590:	83 ec 04             	sub    $0x4,%esp
 593:	6a 01                	push   $0x1
 595:	57                   	push   %edi
 596:	6a 00                	push   $0x0
 598:	e8 2e 01 00 00       	call   6cb <read>
    if(cc < 1)
 59d:	83 c4 10             	add    $0x10,%esp
 5a0:	85 c0                	test   %eax,%eax
 5a2:	7e 1d                	jle    5c1 <gets+0x41>
      break;
    buf[i++] = c;
 5a4:	0f b6 45 e7          	movzbl -0x19(%ebp),%eax
 5a8:	8b 55 08             	mov    0x8(%ebp),%edx
 5ab:	88 44 1a ff          	mov    %al,-0x1(%edx,%ebx,1)
    if(c == '\n' || c == '\r')
 5af:	3c 0a                	cmp    $0xa,%al
 5b1:	74 1d                	je     5d0 <gets+0x50>
 5b3:	3c 0d                	cmp    $0xd,%al
 5b5:	74 19                	je     5d0 <gets+0x50>
  for(i=0; i+1 < max; ){
 5b7:	89 de                	mov    %ebx,%esi
 5b9:	83 c3 01             	add    $0x1,%ebx
 5bc:	3b 5d 0c             	cmp    0xc(%ebp),%ebx
 5bf:	7c cf                	jl     590 <gets+0x10>
      break;
  }
  buf[i] = '\0';
 5c1:	8b 45 08             	mov    0x8(%ebp),%eax
 5c4:	c6 04 30 00          	movb   $0x0,(%eax,%esi,1)
  return buf;
}
 5c8:	8d 65 f4             	lea    -0xc(%ebp),%esp
 5cb:	5b                   	pop    %ebx
 5cc:	5e                   	pop    %esi
 5cd:	5f                   	pop    %edi
 5ce:	5d                   	pop    %ebp
 5cf:	c3                   	ret    
  buf[i] = '\0';
 5d0:	8b 45 08             	mov    0x8(%ebp),%eax
 5d3:	89 de                	mov    %ebx,%esi
 5d5:	c6 04 30 00          	movb   $0x0,(%eax,%esi,1)
}
 5d9:	8d 65 f4             	lea    -0xc(%ebp),%esp
 5dc:	5b                   	pop    %ebx
 5dd:	5e                   	pop    %esi
 5de:	5f                   	pop    %edi
 5df:	5d                   	pop    %ebp
 5e0:	c3                   	ret    
 5e1:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 5e8:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 5ef:	90                   	nop

000005f0 <stat>:

int
stat(char *n, struct stat *st)
{
 5f0:	55                   	push   %ebp
 5f1:	89 e5                	mov    %esp,%ebp
 5f3:	56                   	push   %esi
 5f4:	53                   	push   %ebx
  int fd;
  int r;

  fd = open(n, O_RDONLY);
 5f5:	83 ec 08             	sub    $0x8,%esp
 5f8:	6a 00                	push   $0x0
 5fa:	ff 75 08             	push   0x8(%ebp)
 5fd:	e8 f1 00 00 00       	call   6f3 <open>
  if(fd < 0)
 602:	83 c4 10             	add    $0x10,%esp
 605:	85 c0                	test   %eax,%eax
 607:	78 27                	js     630 <stat+0x40>
    return -1;
  r = fstat(fd, st);
 609:	83 ec 08             	sub    $0x8,%esp
 60c:	ff 75 0c             	push   0xc(%ebp)
 60f:	89 c3                	mov    %eax,%ebx
 611:	50                   	push   %eax
 612:	e8 f4 00 00 00       	call   70b <fstat>
  close(fd);
 617:	89 1c 24             	mov    %ebx,(%esp)
  r = fstat(fd, st);
 61a:	89 c6                	mov    %eax,%esi
  close(fd);
 61c:	e8 ba 00 00 00       	call   6db <close>
  return r;
 621:	83 c4 10             	add    $0x10,%esp
}
 624:	8d 65 f8             	lea    -0x8(%ebp),%esp
 627:	89 f0                	mov    %esi,%eax
 629:	5b                   	pop    %ebx
 62a:	5e                   	pop    %esi
 62b:	5d                   	pop    %ebp
 62c:	c3                   	ret    
 62d:	8d 76 00             	lea    0x0(%esi),%esi
    return -1;
 630:	be ff ff ff ff       	mov    $0xffffffff,%esi
 635:	eb ed                	jmp    624 <stat+0x34>
 637:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 63e:	66 90                	xchg   %ax,%ax

00000640 <atoi>:

int
atoi(const char *s)
{
 640:	55                   	push   %ebp
 641:	89 e5                	mov    %esp,%ebp
 643:	53                   	push   %ebx
 644:	8b 55 08             	mov    0x8(%ebp),%edx
  int n;

  n = 0;
  while('0' <= *s && *s <= '9')
 647:	0f be 02             	movsbl (%edx),%eax
 64a:	8d 48 d0             	lea    -0x30(%eax),%ecx
 64d:	80 f9 09             	cmp    $0x9,%cl
  n = 0;
 650:	b9 00 00 00 00       	mov    $0x0,%ecx
  while('0' <= *s && *s <= '9')
 655:	77 1e                	ja     675 <atoi+0x35>
 657:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 65e:	66 90                	xchg   %ax,%ax
    n = n*10 + *s++ - '0';
 660:	83 c2 01             	add    $0x1,%edx
 663:	8d 0c 89             	lea    (%ecx,%ecx,4),%ecx
 666:	8d 4c 48 d0          	lea    -0x30(%eax,%ecx,2),%ecx
  while('0' <= *s && *s <= '9')
 66a:	0f be 02             	movsbl (%edx),%eax
 66d:	8d 58 d0             	lea    -0x30(%eax),%ebx
 670:	80 fb 09             	cmp    $0x9,%bl
 673:	76 eb                	jbe    660 <atoi+0x20>
  return n;
}
 675:	8b 5d fc             	mov    -0x4(%ebp),%ebx
 678:	89 c8                	mov    %ecx,%eax
 67a:	c9                   	leave  
 67b:	c3                   	ret    
 67c:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi

00000680 <memmove>:

void*
memmove(void *vdst, void *vsrc, int n)
{
 680:	55                   	push   %ebp
 681:	89 e5                	mov    %esp,%ebp
 683:	57                   	push   %edi
 684:	8b 45 10             	mov    0x10(%ebp),%eax
 687:	8b 55 08             	mov    0x8(%ebp),%edx
 68a:	56                   	push   %esi
 68b:	8b 75 0c             	mov    0xc(%ebp),%esi
  char *dst, *src;

  dst = vdst;
  src = vsrc;
  while(n-- > 0)
 68e:	85 c0                	test   %eax,%eax
 690:	7e 13                	jle    6a5 <memmove+0x25>
 692:	01 d0                	add    %edx,%eax
  dst = vdst;
 694:	89 d7                	mov    %edx,%edi
 696:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 69d:	8d 76 00             	lea    0x0(%esi),%esi
    *dst++ = *src++;
 6a0:	a4                   	movsb  %ds:(%esi),%es:(%edi)
  while(n-- > 0)
 6a1:	39 f8                	cmp    %edi,%eax
 6a3:	75 fb                	jne    6a0 <memmove+0x20>
  return vdst;
}
 6a5:	5e                   	pop    %esi
 6a6:	89 d0                	mov    %edx,%eax
 6a8:	5f                   	pop    %edi
 6a9:	5d                   	pop    %ebp
 6aa:	c3                   	ret    

000006ab <fork>:
  name: \
    movl $SYS_ ## name, %eax; \
    int $T_SYSCALL; \
    ret

SYSCALL(fork)
 6ab:	b8 01 00 00 00       	mov    $0x1,%eax
 6b0:	cd 40                	int    $0x40
 6b2:	c3                   	ret    

000006b3 <exit>:
SYSCALL(exit)
 6b3:	b8 02 00 00 00       	mov    $0x2,%eax
 6b8:	cd 40                	int    $0x40
 6ba:	c3                   	ret    

000006bb <wait>:
SYSCALL(wait)
 6bb:	b8 03 00 00 00       	mov    $0x3,%eax
 6c0:	cd 40                	int    $0x40
 6c2:	c3                   	ret    

000006c3 <pipe>:
SYSCALL(pipe)
 6c3:	b8 04 00 00 00       	mov    $0x4,%eax
 6c8:	cd 40                	int    $0x40
 6ca:	c3                   	ret    

000006cb <read>:
SYSCALL(read)
 6cb:	b8 05 00 00 00       	mov    $0x5,%eax
 6d0:	cd 40                	int    $0x40
 6d2:	c3                   	ret    

000006d3 <write>:
SYSCALL(write)
 6d3:	b8 10 00 00 00       	mov    $0x10,%eax
 6d8:	cd 40                	int    $0x40
 6da:	c3                   	ret    

000006db <close>:
SYSCALL(close)
 6db:	b8 15 00 00 00       	mov    $0x15,%eax
 6e0:	cd 40                	int    $0x40
 6e2:	c3                   	ret    

000006e3 <kill>:
SYSCALL(kill)
 6e3:	b8 06 00 00 00       	mov    $0x6,%eax
 6e8:	cd 40                	int    $0x40
 6ea:	c3                   	ret    

000006eb <exec>:
SYSCALL(exec)
 6eb:	b8 07 00 00 00       	mov    $0x7,%eax
 6f0:	cd 40                	int    $0x40
 6f2:	c3                   	ret    

000006f3 <open>:
SYSCALL(open)
 6f3:	b8 0f 00 00 00       	mov    $0xf,%eax
 6f8:	cd 40                	int    $0x40
 6fa:	c3                   	ret    

000006fb <mknod>:
SYSCALL(mknod)
 6fb:	b8 11 00 00 00       	mov    $0x11,%eax
 700:	cd 40                	int    $0x40
 702:	c3                   	ret    

00000703 <unlink>:
SYSCALL(unlink)
 703:	b8 12 00 00 00       	mov    $0x12,%eax
 708:	cd 40                	int    $0x40
 70a:	c3                   	ret    

0000070b <fstat>:
SYSCALL(fstat)
 70b:	b8 08 00 00 00       	mov    $0x8,%eax
 710:	cd 40                	int    $0x40
 712:	c3                   	ret    

00000713 <link>:
SYSCALL(link)
 713:	b8 13 00 00 00       	mov    $0x13,%eax
 718:	cd 40                	int    $0x40
 71a:	c3                   	ret    

0000071b <mkdir>:
SYSCALL(mkdir)
 71b:	b8 14 00 00 00       	mov    $0x14,%eax
 720:	cd 40                	int    $0x40
 722:	c3                   	ret    

00000723 <chdir>:
SYSCALL(chdir)
 723:	b8 09 00 00 00       	mov    $0x9,%eax
 728:	cd 40                	int    $0x40
 72a:	c3                   	ret    

0000072b <dup>:
SYSCALL(dup)
 72b:	b8 0a 00 00 00       	mov    $0xa,%eax
 730:	cd 40                	int    $0x40
 732:	c3                   	ret    

00000733 <getpid>:
SYSCALL(getpid)
 733:	b8 0b 00 00 00       	mov    $0xb,%eax
 738:	cd 40                	int    $0x40
 73a:	c3                   	ret    

0000073b <sbrk>:
SYSCALL(sbrk)
 73b:	b8 0c 00 00 00       	mov    $0xc,%eax
 740:	cd 40                	int    $0x40
 742:	c3                   	ret    

00000743 <sleep>:
SYSCALL(sleep)
 743:	b8 0d 00 00 00       	mov    $0xd,%eax
 748:	cd 40                	int    $0x40
 74a:	c3                   	ret    

0000074b <uptime>:
SYSCALL(uptime)
 74b:	b8 0e 00 00 00       	mov    $0xe,%eax
 750:	cd 40                	int    $0x40
 752:	c3                   	ret    

00000753 <shutdown>:
SYSCALL(shutdown)
 753:	b8 16 00 00 00       	mov    $0x16,%eax
 758:	cd 40                	int    $0x40
 75a:	c3                   	ret    

0000075b <set_quantum>:
SYSCALL(set_quantum)
 75b:	b8 19 00 00 00       	mov    $0x19,%eax
 760:	cd 40                	int    $0x40
 762:	c3                   	ret    

00000763 <set_priority>:
SYSCALL(set_priority)
 763:	b8 17 00 00 00       	mov    $0x17,%eax
 768:	cd 40                	int    $0x40
 76a:	c3                   	ret    

0000076b <enable_sched_display>:
SYSCALL(enable_sched_display)
 76b:	b8 18 00 00 00       	mov    $0x18,%eax
 770:	cd 40                	int    $0x40
 772:	c3                   	ret    

00000773 <alloc_sem>:
SYSCALL(alloc_sem)
 773:	b8 1a 00 00 00       	mov    $0x1a,%eax
 778:	cd 40                	int    $0x40
 77a:	c3                   	ret    

0000077b <wait_sem>:
SYSCALL(wait_sem)
 77b:	b8 1b 00 00 00       	mov    $0x1b,%eax
 780:	cd 40                	int    $0x40
 782:	c3                   	ret    

00000783 <signal_sem>:
SYSCALL(signal_sem)
 783:	b8 1c 00 00 00       	mov    $0x1c,%eax
 788:	cd 40                	int    $0x40
 78a:	c3                   	ret    

0000078b <dealloc_sem>:
SYSCALL(dealloc_sem)
 78b:	b8 1d 00 00 00       	mov    $0x1d,%eax
 790:	cd 40                	int    $0x40
 792:	c3                   	ret    
 793:	66 90                	xchg   %ax,%ax
 795:	66 90                	xchg   %ax,%ax
 797:	66 90                	xchg   %ax,%ax
 799:	66 90                	xchg   %ax,%ax
 79b:	66 90                	xchg   %ax,%ax
 79d:	66 90                	xchg   %ax,%ax
 79f:	90                   	nop

000007a0 <printint>:
  write(fd, &c, 1);
}

static void
printint(int fd, int xx, int base, int sgn)
{
 7a0:	55                   	push   %ebp
 7a1:	89 e5                	mov    %esp,%ebp
 7a3:	57                   	push   %edi
 7a4:	56                   	push   %esi
 7a5:	53                   	push   %ebx
 7a6:	83 ec 3c             	sub    $0x3c,%esp
 7a9:	89 4d c4             	mov    %ecx,-0x3c(%ebp)
  uint x;

  neg = 0;
  if(sgn && xx < 0){
    neg = 1;
    x = -xx;
 7ac:	89 d1                	mov    %edx,%ecx
{
 7ae:	89 45 b8             	mov    %eax,-0x48(%ebp)
  if(sgn && xx < 0){
 7b1:	85 d2                	test   %edx,%edx
 7b3:	0f 89 7f 00 00 00    	jns    838 <printint+0x98>
 7b9:	f6 45 08 01          	testb  $0x1,0x8(%ebp)
 7bd:	74 79                	je     838 <printint+0x98>
    neg = 1;
 7bf:	c7 45 bc 01 00 00 00 	movl   $0x1,-0x44(%ebp)
    x = -xx;
 7c6:	f7 d9                	neg    %ecx
  } else {
    x = xx;
  }

  i = 0;
 7c8:	31 db                	xor    %ebx,%ebx
 7ca:	8d 75 d7             	lea    -0x29(%ebp),%esi
 7cd:	8d 76 00             	lea    0x0(%esi),%esi
  do{
    buf[i++] = digits[x % base];
 7d0:	89 c8                	mov    %ecx,%eax
 7d2:	31 d2                	xor    %edx,%edx
 7d4:	89 cf                	mov    %ecx,%edi
 7d6:	f7 75 c4             	divl   -0x3c(%ebp)
 7d9:	0f b6 92 2c 0c 00 00 	movzbl 0xc2c(%edx),%edx
 7e0:	89 45 c0             	mov    %eax,-0x40(%ebp)
 7e3:	89 d8                	mov    %ebx,%eax
 7e5:	8d 5b 01             	lea    0x1(%ebx),%ebx
  }while((x /= base) != 0);
 7e8:	8b 4d c0             	mov    -0x40(%ebp),%ecx
    buf[i++] = digits[x % base];
 7eb:	88 14 1e             	mov    %dl,(%esi,%ebx,1)
  }while((x /= base) != 0);
 7ee:	39 7d c4             	cmp    %edi,-0x3c(%ebp)
 7f1:	76 dd                	jbe    7d0 <printint+0x30>
  if(neg)
 7f3:	8b 4d bc             	mov    -0x44(%ebp),%ecx
 7f6:	85 c9                	test   %ecx,%ecx
 7f8:	74 0c                	je     806 <printint+0x66>
    buf[i++] = '-';
 7fa:	c6 44 1d d8 2d       	movb   $0x2d,-0x28(%ebp,%ebx,1)
    buf[i++] = digits[x % base];
 7ff:	89 d8                	mov    %ebx,%eax
    buf[i++] = '-';
 801:	ba 2d 00 00 00       	mov    $0x2d,%edx

  while(--i >= 0)
 806:	8b 7d b8             	mov    -0x48(%ebp),%edi
 809:	8d 5c 05 d7          	lea    -0x29(%ebp,%eax,1),%ebx
 80d:	eb 07                	jmp    816 <printint+0x76>
 80f:	90                   	nop
    putc(fd, buf[i]);
 810:	0f b6 13             	movzbl (%ebx),%edx
 813:	83 eb 01             	sub    $0x1,%ebx
  write(fd, &c, 1);
 816:	83 ec 04             	sub    $0x4,%esp
 819:	88 55 d7             	mov    %dl,-0x29(%ebp)
 81c:	6a 01                	push   $0x1
 81e:	56                   	push   %esi
 81f:	57                   	push   %edi
 820:	e8 ae fe ff ff       	call   6d3 <write>
  while(--i >= 0)
 825:	83 c4 10             	add    $0x10,%esp
 828:	39 de                	cmp    %ebx,%esi
 82a:	75 e4                	jne    810 <printint+0x70>
}
 82c:	8d 65 f4             	lea    -0xc(%ebp),%esp
 82f:	5b                   	pop    %ebx
 830:	5e                   	pop    %esi
 831:	5f                   	pop    %edi
 832:	5d                   	pop    %ebp
 833:	c3                   	ret    
 834:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
  neg = 0;
 838:	c7 45 bc 00 00 00 00 	movl   $0x0,-0x44(%ebp)
 83f:	eb 87                	jmp    7c8 <printint+0x28>
 841:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 848:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 84f:	90                   	nop

00000850 <printf>:

// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
 850:	55                   	push   %ebp
 851:	89 e5                	mov    %esp,%ebp
 853:	57                   	push   %edi
 854:	56                   	push   %esi
 855:	53                   	push   %ebx
 856:	83 ec 2c             	sub    $0x2c,%esp
  int c, i, state;
  uint *ap;

  state = 0;
  ap = (uint*)(void*)&fmt + 1;
  for(i = 0; fmt[i]; i++){
 859:	8b 5d 0c             	mov    0xc(%ebp),%ebx
{
 85c:	8b 75 08             	mov    0x8(%ebp),%esi
  for(i = 0; fmt[i]; i++){
 85f:	0f b6 13             	movzbl (%ebx),%edx
 862:	84 d2                	test   %dl,%dl
 864:	74 6a                	je     8d0 <printf+0x80>
  ap = (uint*)(void*)&fmt + 1;
 866:	8d 45 10             	lea    0x10(%ebp),%eax
 869:	83 c3 01             	add    $0x1,%ebx
  write(fd, &c, 1);
 86c:	8d 7d e7             	lea    -0x19(%ebp),%edi
  state = 0;
 86f:	31 c9                	xor    %ecx,%ecx
  ap = (uint*)(void*)&fmt + 1;
 871:	89 45 d0             	mov    %eax,-0x30(%ebp)
 874:	eb 36                	jmp    8ac <printf+0x5c>
 876:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 87d:	8d 76 00             	lea    0x0(%esi),%esi
 880:	89 4d d4             	mov    %ecx,-0x2c(%ebp)
    c = fmt[i] & 0xff;
    if(state == 0){
      if(c == '%'){
        state = '%';
 883:	b9 25 00 00 00       	mov    $0x25,%ecx
      if(c == '%'){
 888:	83 f8 25             	cmp    $0x25,%eax
 88b:	74 15                	je     8a2 <printf+0x52>
  write(fd, &c, 1);
 88d:	83 ec 04             	sub    $0x4,%esp
 890:	88 55 e7             	mov    %dl,-0x19(%ebp)
 893:	6a 01                	push   $0x1
 895:	57                   	push   %edi
 896:	56                   	push   %esi
 897:	e8 37 fe ff ff       	call   6d3 <write>
 89c:	8b 4d d4             	mov    -0x2c(%ebp),%ecx
      } else {
        putc(fd, c);
 89f:	83 c4 10             	add    $0x10,%esp
  for(i = 0; fmt[i]; i++){
 8a2:	0f b6 13             	movzbl (%ebx),%edx
 8a5:	83 c3 01             	add    $0x1,%ebx
 8a8:	84 d2                	test   %dl,%dl
 8aa:	74 24                	je     8d0 <printf+0x80>
    c = fmt[i] & 0xff;
 8ac:	0f b6 c2             	movzbl %dl,%eax
    if(state == 0){
 8af:	85 c9                	test   %ecx,%ecx
 8b1:	74 cd                	je     880 <printf+0x30>
      }
    } else if(state == '%'){
 8b3:	83 f9 25             	cmp    $0x25,%ecx
 8b6:	75 ea                	jne    8a2 <printf+0x52>
      if(c == 'd'){
 8b8:	83 f8 25             	cmp    $0x25,%eax
 8bb:	0f 84 07 01 00 00    	je     9c8 <printf+0x178>
 8c1:	83 e8 63             	sub    $0x63,%eax
 8c4:	83 f8 15             	cmp    $0x15,%eax
 8c7:	77 17                	ja     8e0 <printf+0x90>
 8c9:	ff 24 85 d4 0b 00 00 	jmp    *0xbd4(,%eax,4)
        putc(fd, c);
      }
      state = 0;
    }
  }
}
 8d0:	8d 65 f4             	lea    -0xc(%ebp),%esp
 8d3:	5b                   	pop    %ebx
 8d4:	5e                   	pop    %esi
 8d5:	5f                   	pop    %edi
 8d6:	5d                   	pop    %ebp
 8d7:	c3                   	ret    
 8d8:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 8df:	90                   	nop
  write(fd, &c, 1);
 8e0:	83 ec 04             	sub    $0x4,%esp
 8e3:	88 55 d4             	mov    %dl,-0x2c(%ebp)
 8e6:	6a 01                	push   $0x1
 8e8:	57                   	push   %edi
 8e9:	56                   	push   %esi
 8ea:	c6 45 e7 25          	movb   $0x25,-0x19(%ebp)
 8ee:	e8 e0 fd ff ff       	call   6d3 <write>
        putc(fd, c);
 8f3:	0f b6 55 d4          	movzbl -0x2c(%ebp),%edx
  write(fd, &c, 1);
 8f7:	83 c4 0c             	add    $0xc,%esp
 8fa:	88 55 e7             	mov    %dl,-0x19(%ebp)
 8fd:	6a 01                	push   $0x1
 8ff:	57                   	push   %edi
 900:	56                   	push   %esi
 901:	e8 cd fd ff ff       	call   6d3 <write>
        putc(fd, c);
 906:	83 c4 10             	add    $0x10,%esp
      state = 0;
 909:	31 c9                	xor    %ecx,%ecx
 90b:	eb 95                	jmp    8a2 <printf+0x52>
 90d:	8d 76 00             	lea    0x0(%esi),%esi
        printint(fd, *ap, 16, 0);
 910:	83 ec 0c             	sub    $0xc,%esp
 913:	b9 10 00 00 00       	mov    $0x10,%ecx
 918:	6a 00                	push   $0x0
 91a:	8b 45 d0             	mov    -0x30(%ebp),%eax
 91d:	8b 10                	mov    (%eax),%edx
 91f:	89 f0                	mov    %esi,%eax
 921:	e8 7a fe ff ff       	call   7a0 <printint>
        ap++;
 926:	83 45 d0 04          	addl   $0x4,-0x30(%ebp)
 92a:	83 c4 10             	add    $0x10,%esp
      state = 0;
 92d:	31 c9                	xor    %ecx,%ecx
 92f:	e9 6e ff ff ff       	jmp    8a2 <printf+0x52>
 934:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
        s = (char*)*ap;
 938:	8b 45 d0             	mov    -0x30(%ebp),%eax
 93b:	8b 10                	mov    (%eax),%edx
        ap++;
 93d:	83 c0 04             	add    $0x4,%eax
 940:	89 45 d0             	mov    %eax,-0x30(%ebp)
        if(s == 0)
 943:	85 d2                	test   %edx,%edx
 945:	0f 84 8d 00 00 00    	je     9d8 <printf+0x188>
        while(*s != 0){
 94b:	0f b6 02             	movzbl (%edx),%eax
      state = 0;
 94e:	31 c9                	xor    %ecx,%ecx
        while(*s != 0){
 950:	84 c0                	test   %al,%al
 952:	0f 84 4a ff ff ff    	je     8a2 <printf+0x52>
 958:	89 5d d4             	mov    %ebx,-0x2c(%ebp)
 95b:	89 d3                	mov    %edx,%ebx
 95d:	8d 76 00             	lea    0x0(%esi),%esi
  write(fd, &c, 1);
 960:	83 ec 04             	sub    $0x4,%esp
          s++;
 963:	83 c3 01             	add    $0x1,%ebx
 966:	88 45 e7             	mov    %al,-0x19(%ebp)
  write(fd, &c, 1);
 969:	6a 01                	push   $0x1
 96b:	57                   	push   %edi
 96c:	56                   	push   %esi
 96d:	e8 61 fd ff ff       	call   6d3 <write>
        while(*s != 0){
 972:	0f b6 03             	movzbl (%ebx),%eax
 975:	83 c4 10             	add    $0x10,%esp
 978:	84 c0                	test   %al,%al
 97a:	75 e4                	jne    960 <printf+0x110>
      state = 0;
 97c:	8b 5d d4             	mov    -0x2c(%ebp),%ebx
 97f:	31 c9                	xor    %ecx,%ecx
 981:	e9 1c ff ff ff       	jmp    8a2 <printf+0x52>
 986:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 98d:	8d 76 00             	lea    0x0(%esi),%esi
        printint(fd, *ap, 10, 1);
 990:	83 ec 0c             	sub    $0xc,%esp
 993:	b9 0a 00 00 00       	mov    $0xa,%ecx
 998:	6a 01                	push   $0x1
 99a:	e9 7b ff ff ff       	jmp    91a <printf+0xca>
 99f:	90                   	nop
        putc(fd, *ap);
 9a0:	8b 45 d0             	mov    -0x30(%ebp),%eax
  write(fd, &c, 1);
 9a3:	83 ec 04             	sub    $0x4,%esp
        putc(fd, *ap);
 9a6:	8b 00                	mov    (%eax),%eax
  write(fd, &c, 1);
 9a8:	6a 01                	push   $0x1
 9aa:	57                   	push   %edi
 9ab:	56                   	push   %esi
        putc(fd, *ap);
 9ac:	88 45 e7             	mov    %al,-0x19(%ebp)
  write(fd, &c, 1);
 9af:	e8 1f fd ff ff       	call   6d3 <write>
        ap++;
 9b4:	83 45 d0 04          	addl   $0x4,-0x30(%ebp)
 9b8:	83 c4 10             	add    $0x10,%esp
      state = 0;
 9bb:	31 c9                	xor    %ecx,%ecx
 9bd:	e9 e0 fe ff ff       	jmp    8a2 <printf+0x52>
 9c2:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
        putc(fd, c);
 9c8:	88 55 e7             	mov    %dl,-0x19(%ebp)
  write(fd, &c, 1);
 9cb:	83 ec 04             	sub    $0x4,%esp
 9ce:	e9 2a ff ff ff       	jmp    8fd <printf+0xad>
 9d3:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
 9d7:	90                   	nop
          s = "(null)";
 9d8:	ba ca 0b 00 00       	mov    $0xbca,%edx
        while(*s != 0){
 9dd:	89 5d d4             	mov    %ebx,-0x2c(%ebp)
 9e0:	b8 28 00 00 00       	mov    $0x28,%eax
 9e5:	89 d3                	mov    %edx,%ebx
 9e7:	e9 74 ff ff ff       	jmp    960 <printf+0x110>
 9ec:	66 90                	xchg   %ax,%ax
 9ee:	66 90                	xchg   %ax,%ax

000009f0 <free>:
static Header base;
static Header *freep;

void
free(void *ap)
{
 9f0:	55                   	push   %ebp
  Header *bp, *p;

  bp = (Header*)ap - 1;
  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
 9f1:	a1 64 0f 00 00       	mov    0xf64,%eax
{
 9f6:	89 e5                	mov    %esp,%ebp
 9f8:	57                   	push   %edi
 9f9:	56                   	push   %esi
 9fa:	53                   	push   %ebx
 9fb:	8b 5d 08             	mov    0x8(%ebp),%ebx
  bp = (Header*)ap - 1;
 9fe:	8d 4b f8             	lea    -0x8(%ebx),%ecx
  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
 a01:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 a08:	89 c2                	mov    %eax,%edx
 a0a:	8b 00                	mov    (%eax),%eax
 a0c:	39 ca                	cmp    %ecx,%edx
 a0e:	73 30                	jae    a40 <free+0x50>
 a10:	39 c1                	cmp    %eax,%ecx
 a12:	72 04                	jb     a18 <free+0x28>
    if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
 a14:	39 c2                	cmp    %eax,%edx
 a16:	72 f0                	jb     a08 <free+0x18>
      break;
  if(bp + bp->s.size == p->s.ptr){
 a18:	8b 73 fc             	mov    -0x4(%ebx),%esi
 a1b:	8d 3c f1             	lea    (%ecx,%esi,8),%edi
 a1e:	39 f8                	cmp    %edi,%eax
 a20:	74 30                	je     a52 <free+0x62>
    bp->s.size += p->s.ptr->s.size;
    bp->s.ptr = p->s.ptr->s.ptr;
 a22:	89 43 f8             	mov    %eax,-0x8(%ebx)
  } else
    bp->s.ptr = p->s.ptr;
  if(p + p->s.size == bp){
 a25:	8b 42 04             	mov    0x4(%edx),%eax
 a28:	8d 34 c2             	lea    (%edx,%eax,8),%esi
 a2b:	39 f1                	cmp    %esi,%ecx
 a2d:	74 3a                	je     a69 <free+0x79>
    p->s.size += bp->s.size;
    p->s.ptr = bp->s.ptr;
 a2f:	89 0a                	mov    %ecx,(%edx)
  } else
    p->s.ptr = bp;
  freep = p;
}
 a31:	5b                   	pop    %ebx
  freep = p;
 a32:	89 15 64 0f 00 00    	mov    %edx,0xf64
}
 a38:	5e                   	pop    %esi
 a39:	5f                   	pop    %edi
 a3a:	5d                   	pop    %ebp
 a3b:	c3                   	ret    
 a3c:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
    if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
 a40:	39 c2                	cmp    %eax,%edx
 a42:	72 c4                	jb     a08 <free+0x18>
 a44:	39 c1                	cmp    %eax,%ecx
 a46:	73 c0                	jae    a08 <free+0x18>
  if(bp + bp->s.size == p->s.ptr){
 a48:	8b 73 fc             	mov    -0x4(%ebx),%esi
 a4b:	8d 3c f1             	lea    (%ecx,%esi,8),%edi
 a4e:	39 f8                	cmp    %edi,%eax
 a50:	75 d0                	jne    a22 <free+0x32>
    bp->s.size += p->s.ptr->s.size;
 a52:	03 70 04             	add    0x4(%eax),%esi
 a55:	89 73 fc             	mov    %esi,-0x4(%ebx)
    bp->s.ptr = p->s.ptr->s.ptr;
 a58:	8b 02                	mov    (%edx),%eax
 a5a:	8b 00                	mov    (%eax),%eax
 a5c:	89 43 f8             	mov    %eax,-0x8(%ebx)
  if(p + p->s.size == bp){
 a5f:	8b 42 04             	mov    0x4(%edx),%eax
 a62:	8d 34 c2             	lea    (%edx,%eax,8),%esi
 a65:	39 f1                	cmp    %esi,%ecx
 a67:	75 c6                	jne    a2f <free+0x3f>
    p->s.size += bp->s.size;
 a69:	03 43 fc             	add    -0x4(%ebx),%eax
  freep = p;
 a6c:	89 15 64 0f 00 00    	mov    %edx,0xf64
    p->s.size += bp->s.size;
 a72:	89 42 04             	mov    %eax,0x4(%edx)
    p->s.ptr = bp->s.ptr;
 a75:	8b 4b f8             	mov    -0x8(%ebx),%ecx
 a78:	89 0a                	mov    %ecx,(%edx)
}
 a7a:	5b                   	pop    %ebx
 a7b:	5e                   	pop    %esi
 a7c:	5f                   	pop    %edi
 a7d:	5d                   	pop    %ebp
 a7e:	c3                   	ret    
 a7f:	90                   	nop

00000a80 <malloc>:
  return freep;
}

void*
malloc(uint nbytes)
{
 a80:	55                   	push   %ebp
 a81:	89 e5                	mov    %esp,%ebp
 a83:	57                   	push   %edi
 a84:	56                   	push   %esi
 a85:	53                   	push   %ebx
 a86:	83 ec 1c             	sub    $0x1c,%esp
  Header *p, *prevp;
  uint nunits;

  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
 a89:	8b 45 08             	mov    0x8(%ebp),%eax
  if((prevp = freep) == 0){
 a8c:	8b 3d 64 0f 00 00    	mov    0xf64,%edi
  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
 a92:	8d 70 07             	lea    0x7(%eax),%esi
 a95:	c1 ee 03             	shr    $0x3,%esi
 a98:	83 c6 01             	add    $0x1,%esi
  if((prevp = freep) == 0){
 a9b:	85 ff                	test   %edi,%edi
 a9d:	0f 84 9d 00 00 00    	je     b40 <malloc+0xc0>
    base.s.ptr = freep = prevp = &base;
    base.s.size = 0;
  }
  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
 aa3:	8b 17                	mov    (%edi),%edx
    if(p->s.size >= nunits){
 aa5:	8b 4a 04             	mov    0x4(%edx),%ecx
 aa8:	39 f1                	cmp    %esi,%ecx
 aaa:	73 6a                	jae    b16 <malloc+0x96>
 aac:	bb 00 10 00 00       	mov    $0x1000,%ebx
 ab1:	39 de                	cmp    %ebx,%esi
 ab3:	0f 43 de             	cmovae %esi,%ebx
  p = sbrk(nu * sizeof(Header));
 ab6:	8d 04 dd 00 00 00 00 	lea    0x0(,%ebx,8),%eax
 abd:	89 45 e4             	mov    %eax,-0x1c(%ebp)
 ac0:	eb 17                	jmp    ad9 <malloc+0x59>
 ac2:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
 ac8:	8b 02                	mov    (%edx),%eax
    if(p->s.size >= nunits){
 aca:	8b 48 04             	mov    0x4(%eax),%ecx
 acd:	39 f1                	cmp    %esi,%ecx
 acf:	73 4f                	jae    b20 <malloc+0xa0>
        p->s.size = nunits;
      }
      freep = prevp;
      return (void*)(p + 1);
    }
    if(p == freep)
 ad1:	8b 3d 64 0f 00 00    	mov    0xf64,%edi
 ad7:	89 c2                	mov    %eax,%edx
 ad9:	39 d7                	cmp    %edx,%edi
 adb:	75 eb                	jne    ac8 <malloc+0x48>
  p = sbrk(nu * sizeof(Header));
 add:	83 ec 0c             	sub    $0xc,%esp
 ae0:	ff 75 e4             	push   -0x1c(%ebp)
 ae3:	e8 53 fc ff ff       	call   73b <sbrk>
  if(p == (char*)-1)
 ae8:	83 c4 10             	add    $0x10,%esp
 aeb:	83 f8 ff             	cmp    $0xffffffff,%eax
 aee:	74 1c                	je     b0c <malloc+0x8c>
  hp->s.size = nu;
 af0:	89 58 04             	mov    %ebx,0x4(%eax)
  free((void*)(hp + 1));
 af3:	83 ec 0c             	sub    $0xc,%esp
 af6:	83 c0 08             	add    $0x8,%eax
 af9:	50                   	push   %eax
 afa:	e8 f1 fe ff ff       	call   9f0 <free>
  return freep;
 aff:	8b 15 64 0f 00 00    	mov    0xf64,%edx
      if((p = morecore(nunits)) == 0)
 b05:	83 c4 10             	add    $0x10,%esp
 b08:	85 d2                	test   %edx,%edx
 b0a:	75 bc                	jne    ac8 <malloc+0x48>
        return 0;
  }
}
 b0c:	8d 65 f4             	lea    -0xc(%ebp),%esp
        return 0;
 b0f:	31 c0                	xor    %eax,%eax
}
 b11:	5b                   	pop    %ebx
 b12:	5e                   	pop    %esi
 b13:	5f                   	pop    %edi
 b14:	5d                   	pop    %ebp
 b15:	c3                   	ret    
    if(p->s.size >= nunits){
 b16:	89 d0                	mov    %edx,%eax
 b18:	89 fa                	mov    %edi,%edx
 b1a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
      if(p->s.size == nunits)
 b20:	39 ce                	cmp    %ecx,%esi
 b22:	74 4c                	je     b70 <malloc+0xf0>
        p->s.size -= nunits;
 b24:	29 f1                	sub    %esi,%ecx
 b26:	89 48 04             	mov    %ecx,0x4(%eax)
        p += p->s.size;
 b29:	8d 04 c8             	lea    (%eax,%ecx,8),%eax
        p->s.size = nunits;
 b2c:	89 70 04             	mov    %esi,0x4(%eax)
      freep = prevp;
 b2f:	89 15 64 0f 00 00    	mov    %edx,0xf64
}
 b35:	8d 65 f4             	lea    -0xc(%ebp),%esp
      return (void*)(p + 1);
 b38:	83 c0 08             	add    $0x8,%eax
}
 b3b:	5b                   	pop    %ebx
 b3c:	5e                   	pop    %esi
 b3d:	5f                   	pop    %edi
 b3e:	5d                   	pop    %ebp
 b3f:	c3                   	ret    
    base.s.ptr = freep = prevp = &base;
 b40:	c7 05 64 0f 00 00 68 	movl   $0xf68,0xf64
 b47:	0f 00 00 
    base.s.size = 0;
 b4a:	bf 68 0f 00 00       	mov    $0xf68,%edi
    base.s.ptr = freep = prevp = &base;
 b4f:	c7 05 68 0f 00 00 68 	movl   $0xf68,0xf68
 b56:	0f 00 00 
  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
 b59:	89 fa                	mov    %edi,%edx
    base.s.size = 0;
 b5b:	c7 05 6c 0f 00 00 00 	movl   $0x0,0xf6c
 b62:	00 00 00 
    if(p->s.size >= nunits){
 b65:	e9 42 ff ff ff       	jmp    aac <malloc+0x2c>
 b6a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
        prevp->s.ptr = p->s.ptr;
 b70:	8b 08                	mov    (%eax),%ecx
 b72:	89 0a                	mov    %ecx,(%edx)
 b74:	eb b9                	jmp    b2f <malloc+0xaf>
